

--拆分合并表主键修改
CREATE SEQUENCE SEQ_NVAT_REVENUEMAPSELF;


-- 新增数据字典

--增加字典：交易流水数据开票状态：0-锁定
INSERT INTO DEF_BIZDICTDETAIL (LXDM, LXXDM, LXXMC, FLXXDM, YYDM, PLXH, QYZT, EXPCOL1, EXPCOL2, LXXDMLJ) VALUES ('VAT-0002', '0', '锁定', 'Y', 'CN', 0, '1', null, null, '.VAT-0002.0.');
--流程类型增加
INSERT INTO "DEF_BIZDICTDETAIL" ("LXDM", "LXXDM", "LXXMC", "FLXXDM", "YYDM", "PLXH", "QYZT", "EXPCOL1", "EXPCOL2", "LXXDMLJ") VALUES ('VMS_WORK_FLOW_TYPE', 'FLOW_PPLS', '发票匹配流水申请', 'Y', 'CN', '7', '1', NULL, NULL, '.VMS_WORK_FLOW_TYPE.FLOW_PPLS.');
INSERT INTO "DEF_BIZDICTDETAIL" ("LXDM", "LXXDM", "LXXMC", "FLXXDM", "YYDM", "PLXH", "QYZT", "EXPCOL1", "EXPCOL2", "LXXDMLJ") VALUES ('VMS_WORK_FLOW_TYPE', 'FLOW_PPLSCX', '发票匹配流水撤销', 'Y', 'CN', '8', '1', NULL, NULL, '.VMS_WORK_FLOW_TYPE.FLOW_PPLSCX.');

-- 新增流程模板
INSERT INTO "WF_PROCESS_TEMPLATES" ("ID", "BUS_TYPE", "TEMPLATE_NAME", "SETTINGS", "PROCESS_VARIABLES", "PROCESS", "REMARK", "DEL_FLAG", "CREATE_BY", "CREATE_TIME", "UPDATE_BY", "UPDATE_TIME") VALUES (SEQ_WF_PROCESS_TEMPLATES.NEXTVAL, 'FLOW_PPLS', '发票匹配流水申请', '{"commiter":[],"admin":[],"sign":false,"notify":{"types":["APP"],"title":"消息通知标题"}}', NULL, '{"id":"root","parentId":null,"type":"ROOT","name":"发起人","desc":"任何人","props":{"assignedUser":[],"formPerms":[]},"children":{"id":"FLOW_PPLS_SP","parentId":"root","props":{"assignedType":"ROLE","mode":"OR","sign":false,"nobody":{"handler":"TO_PASS","assignedUser":[]},"timeLimit":{"timeout":{"unit":"H","value":0},"handler":{"type":"NOTIFY","notify":{"once":true,"hour":1}}},"assignedUser":[],"formPerms":[],"selfSelect":{"multiple":false},"leaderTop":{"endCondition":"TOP","endLevel":1},"leader":{"level":1},"role":[{"id":10,"roleName":"财务开票审核岗"}],"dept":[],"refuse":{"type":"TO_BEFORE","target":""},"formUser":""},"type":"APPROVAL","name":"审批","children":{}}}', '发票匹配流水申请', '1', 'kf', TO_DATE('2024-07-01 07:36:50', 'SYYYY-MM-DD HH24:MI:SS'), 'kf', TO_DATE('2024-07-01 10:01:26', 'SYYYY-MM-DD HH24:MI:SS'));
INSERT INTO "WF_PROCESS_TEMPLATES" ("ID", "BUS_TYPE", "TEMPLATE_NAME", "SETTINGS", "PROCESS_VARIABLES", "PROCESS", "REMARK", "DEL_FLAG", "CREATE_BY", "CREATE_TIME", "UPDATE_BY", "UPDATE_TIME") VALUES (SEQ_WF_PROCESS_TEMPLATES.NEXTVAL, 'FLOW_PPLSCX', '发票匹配流水撤销', '{"commiter":[],"admin":[],"sign":false,"notify":{"types":["APP"],"title":"消息通知标题"}}', NULL, '{"id":"root","parentId":null,"type":"ROOT","name":"发起人","desc":"任何人","props":{"assignedUser":[],"formPerms":[]},"children":{"id":"FLOW_PPLSCX_SP","parentId":"root","props":{"assignedType":"ROLE","mode":"OR","sign":false,"nobody":{"handler":"TO_PASS","assignedUser":[]},"timeLimit":{"timeout":{"unit":"H","value":0},"handler":{"type":"NOTIFY","notify":{"once":true,"hour":1}}},"assignedUser":[],"formPerms":[],"selfSelect":{"multiple":false},"leaderTop":{"endCondition":"TOP","endLevel":1},"leader":{"level":1},"role":[{"id":10,"roleName":"财务开票审核岗"}],"dept":[],"refuse":{"type":"TO_BEFORE","target":""},"formUser":""},"type":"APPROVAL","name":"审批","children":{}}}', '发票匹配流水撤销', '1', 'kf', TO_DATE('2024-07-01 07:38:02', 'SYYYY-MM-DD HH24:MI:SS'), 'kf', TO_DATE('2024-07-01 10:02:33', 'SYYYY-MM-DD HH24:MI:SS'));

--新增菜单：流水追溯发票查询
INSERT INTO SYS_FUNLIST (FUNID, FUNNAME, PREFUN, FUNKIND, INDEXNUM, URL, FUNTYPE, TARGET, MENUID, APPNAME, MODULENAME, ICON)
VALUES ((SELECT MAX(FUNID)+1 FROM SYS_FUNLIST), '流水追溯发票查询', ( SELECT MAX(FUNID) FROM SYS_FUNLIST  WHERE MENUID='VMS_INVOICEDINFO'), '6', 13, '/flowRecallInvoiceSearch', 1, '_default', 'VMS_JYLSZS', 'public', null, null);

